function Pager(div) {

	this.render = function(page, pageSize, total) {
		var pageBtns = {};
		pageBtns[div + 'First'] = { page: 1, label: '&lt;&lt;'};
		pageBtns[div + 'Prev'] = { page: Math.max(1, page - 1), label: '&lt;'};
		var p = Math.max(1, page - 2);
		while(p <= Math.min(page + 2, total)) {
			pageBtns[div + p] = { page: p, label: p};
			p++;
		}
		pageBtns[div + 'Next'] = { page: Math.min(total, page + 1), label: '&gt;'};
		pageBtns[div + 'Last'] = { page: total, label: '&gt;&gt;'};
		var html = '<table><tr>';
		var btns = new Array();
		for (var btn in pageBtns) {
			btns.push(btn);
			html += '<td><input id="' + btn + '" type="button" value="' + pageBtns[btn].label + '" /></td>';
		}
		html += '<td class="label-small td-hspacer16">Транзакций<br>на странице:</td><td><div id="' + div + 'PageSize"></div></td></tr></table>';
		el(div).html(html);

		$.each(btns, function(index, btn) {
			el(btn).jqxButton({ height: 25, disabled: pageBtns[btn].page === page }).on('click', function () {
				$.publish(div + '-page-changed', { page: pageBtns[btn].page });
			});
		});
		var pageSizes = [2, 10, 25, 50];
		var selected = Math.max(0, pageSizes.indexOf(pageSize));
		el(div + 'PageSize').jqxComboBox({ source: pageSizes, width: 50, selectedIndex: selected }).on('select', function(event) {
			$.publish(div + '-pageSize-changed', { pageSize: parseInt(event.args.item.value) });
		});
	};
};